package model

import (
	"gitee.com/jinmingzhi/kit/rdb"
	"time"
)

type Score struct {
	ID         uint32  `db:"id"`
	BatchName  string  `db:"batch_name"`
	CourseName string  `db:"course_name"`
	Status     bool    `db:"status"`
	Result     float32 `db:"result"`
}

type SchoolReport struct {
	ID           uint32   `db:"id"`
	UID          uint32   `db:"uid"`
	BatchTimeID  uint32   `db:"batch_time_id"`  // 统考批次id
	CourseID     uint32   `db:"course_id"`      // 统考科目
	SchoolTime   string   `db:"school_time"`    // 考试时间
	AreaSchoolID uint32   `db:"area_school_id"` // 地区学校Id
	Status       bool     `db:"status"`         // 报考成绩是否已出
	CreateTime   rdb.Time `db:"create_time"`
	Result       float32  `db:"result"` // 成绩
}

func NewSchoolReport(uid, batch_time_id, course_id, area_school_id uint32, school_time string) *SchoolReport {
	return &SchoolReport{
		UID:          uid,
		BatchTimeID:  batch_time_id,
		CourseID:     course_id,
		AreaSchoolID: area_school_id,
		SchoolTime:   school_time,
		Status:       false,
		CreateTime:   rdb.FromTime(time.Now()),
		Result:       0,
	}
}
